For script code notes, Trilium offers an API that gives them access to various features of the application.
There are two APIs:
In both cases, the API resides in a global variable, api,
that can be used anywhere in the script.
For example, to display a message to the user the following front-end script can be used:
api.showMessage("Hello world.");